package net.zdreamer.geracomium.ui;

import net.zdreamer.geracomium.adapter.GridViewAdapter;
import net.zdreamer.geracomium.entity.GridImageInfos;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.GridView;

import com.example.geracomium.R;

public class DinnerTabActivity extends Activity {
    private GridView gridView;
    private GridViewAdapter adapter;
    private String where;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_breakfast);
        Intent intent = getIntent();
        where = intent.getStringExtra("gridinfo");
        init();
    }

    private void init() {
        gridView = (GridView) findViewById(R.id.reserve_grid);
        GridImageInfos imageinfos = new GridImageInfos();
        adapter = new GridViewAdapter(DinnerTabActivity.this, imageinfos.images,
                R.layout.gridview_item, where);
        gridView.setAdapter(adapter);
    }
}
